local wotao = fk.CreateSkill {
  name = "lvshi__wotao",
  tags = {"ready_skill"}
}

Fk:loadTranslationTable{
  ["lvshi__wotao"] = "握韬",
  [":lvshi__wotao"] = "<a href='diy_ready_skill'>蓄势技</a>，你可将一张黑色牌当【无懈可击】使用。",

  ["$lvshi__wotao"] = "军略不止，良策不息。",
}
local DIY = require "packages/diy_utility/diy_utility"
wotao:addEffect("viewas", {
  anim_type = "control",
  pattern = "nullification",
  mute_card = true,
  handly_pile = true,
  card_filter = function(self, player, to_select, selected)
    return #selected == 0 and Fk:getCardById(to_select).color == Card.Black
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local c = Fk:cloneCard("nullification")
    c.skillName = wotao.name
    c:addSubcard(cards[1])
    return c
  end,
  enabled_at_play = function(self, player)
    return not DIY.isReadying(player, wotao.name)
  end,
  enabled_at_response = function (self, player, response)
    return not response and not DIY.isReadying(player, wotao.name)
  end
})

return wotao